package com.ocom.company.dao;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ocom.common.entity.master.EntityWechatPerInfo;
import com.ocom.common.vo.company.GzhPerInfoVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;


@Mapper
public interface IDaoWechatPerInfo extends BaseMapper<EntityWechatPerInfo> {

	@Select({"<script>",
			"select c.com_id , c.com_name , w.p_id  \n" +
					"FROM wechat_per_info  w \n" +
					"left join company_list c on w.com_id = c.com_id   \n" +
					"where w.openid  = #{openid}   and  w.appid =  #{appid}"+
					"</script>"})
	List<GzhPerInfoVo> getCompanyListByAgentGzh(@Param("openid")String openid, @Param("appid")String appid);
}
